<?php

class Zend_View_Helper_Findfree
{
	public function Findfree( $dm ) {		
		$i = 0;

		foreach( $dm as $value ) {
			if( $value['stock'] > 0 ) {
				return $i;
			}
			$i++;
		}

		return 0;
	}
}